<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    <!-- 1.没有使用v-model的radio -->
    <!-- <label for="male">
      <input type="radio" id="male" value="男" name="gender">男
    </label>
    <label for="female">
      <input type="radio" id="female" value="女" name="gender">女
    </label> -->

    <!-- 2.使用v-model -->
    <!-- 使用v-model绑定了相同的值 那么name属性就可以不用写了 -->
    <label for="male">
      <input type="radio" id="male" value="男" v-model="gender">男
    </label>
    <label for="female">
      <input type="radio" id="female" value="女" v-model="gender">女
    </label>
    <h2>您选择的性别是：{{gender}}</h2>
  </div>
  <script src="../js/vue.js"></script>
  <script>
    const app = new Vue({
      el: '#app',
      data: {
        message: '',
        gender:'女'
      },
  })
  </script>
</body>
</html>